#ifndef __DCLINKLIST_H_
#define __DCLINKLIST_H_

#include "DoubleLinkList.h"

struct DoubleCircleLinkList
{
    DLlist dllist;
};
typedef struct DoubleCircleLinkList DCList;

void InitDCList(DCList *list);
void TravelDCList(DCList *list);
void InsertDCListTail(DCList *list, ElementType element);
void InsertDCListHead(DCList *list, ElementType element);
void RemoveHead(DCList *list);
ElementType* FindHead(DCList *list);
bool InsertDCListByIndex(DCList *list, int index, ElementType element);
bool RemoveDCListByIndex(DCList *list, int index);
bool RemoveDCListByElement(DCList *list, ElementType element);
bool UpdateDCListByIndex(DCList *list, int index, ElementType element);
bool UpdateDCListByElement(DCList *list, ElementType oldValue, ElementType newValue);
ElementType* FindDCElementByIndex(DCList *list, int index);
int* FindDCElementByValue(DCList *list, ElementType element);
bool IsDCHaveElement(DCList *list, ElementType element);
bool IsDCEmpty(DCList *list);
void BubbleSortDCList(DCList *list);
DCList GetDCListInsection(DCList *list1, DCList *list2);
DCList GetDCListUnionSet(DCList *list1, DCList *list2);
DCList MergeDCList(DCList *list1, DCList *list2);

#endif